<template>
  <div>
    <el-card class="box-card">
      <div slot="header" class="clearfix">
         <p class="home_title">库存报警</p>
      </div>
      <div class="text item"><el-table :data="tableData" style="width: 100%">
          <el-table-column prop="code" label="商品编码" width="80"></el-table-column>
          <el-table-column prop="name" label="商品名称" width="180"></el-table-column>
          <el-table-column prop="model" label="商品型号" width="100"></el-table-column>
          <el-table-column prop="unit" label="单位" width="80"></el-table-column>
          <el-table-column prop="purchasingPrice" label="采购价" width="100"></el-table-column>
          <el-table-column prop="sellingPrice" label="销售价" width="100"></el-table-column>
          <el-table-column prop="inventoryQuantity" label="当前库存" width="100"></el-table-column>
          <el-table-column prop="minNum" label="库存下限" width="100"></el-table-column>
          <el-table-column prop="producer" label="生产商" width="180"></el-table-column>
        </el-table></div>
    </el-card>
    <el-container>
      <el-header>
       
      </el-header>
      <el-main>
        
      </el-main>
    </el-container>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: []
    };
  },
  mounted() {
    this.getGoodList();
  },
  methods: {
    getGoodList() {
      var $this = this;
      this.axios({
        method: "get",
        url: this.requestUrl + "inventory/inventory/tGoods/list1",
        params: {
          access_token: localStorage.getItem("access_token")
        }
      }).then(function(res) {
        console.log("返回的商品信息", res);
        $this.tableData = res.data.obj;
      });
    }
  }
};
</script>
<style scoped>
.home_title {
  color: #1a1a1a;
  display: inline;
  margin-left: 8px;
  font-size: 20px;
  background-image: linear-gradient(135deg, red, blue);
  -webkit-background-clip: text;
  color: transparent;
  float:left;
}
</style>